package by.gravity.grsu.shedule.adapter;

import java.util.List;

import android.content.Context;
import android.widget.TextView;
import by.gravity.common.adapter.AbstractAdapterWithViewHolder;
import by.gravity.grsu.shedule.R;
import by.gravity.grsu.shedule.model.Lesson;

public class DayAdapter extends AbstractAdapterWithViewHolder<Lesson> {

	public DayAdapter(Context c, int pItemResource, List<Lesson> pList) {
		super(c, pItemResource, pList);
	}

	@Override
	public void init(ViewHolder holder, Lesson item) {
		TextView timeStart = (TextView) holder.findViewById(R.id.timeStart);
		timeStart.setText(item.getTimeStart());

		TextView timeFinish = (TextView) holder.findViewById(R.id.timeFinish);
		timeFinish.setText(item.getTimeFinish());

		TextView lessonName = (TextView) holder.findViewById(R.id.lessonName);
		lessonName.setText(item.getLessonName());

		TextView teacherName = (TextView) holder.findViewById(R.id.teacherName);
		teacherName.setText(item.getTeacherName());

		TextView auditoryName = (TextView) holder.findViewById(R.id.auditoryName);
		auditoryName.setText(item.getAuditoryName());
	}

}
